Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
atomic-file-rw
Advanced tools
This module is meant as a replacement for [atomic-file](https://github.com/flumedb/atomic-file) as it has better error handling on node and is faster in the browser.
This module is meant as a replacement for atomic-file as it has better error handling on node and is faster in the browser.
The library is written to handle writing to a few number of files in a
safe manner. Concurrent writes to the same file are completed in the
order they are started. A temporary file with the same filename as the
original — with a suffix ~
— is employed to ensure atomicity.
Write a buffer to file and read it again:
const atomic = require('atomic-file-rw')
atomic.writeFile("test.txt", Buffer.from('GREETINGS'), (err, x) => {
atomic.readFile("test.txt", (err, buf) => {
console.log(buf.toString())
})
})
atomic.readFile(path[, options], callback)
Same arguments as Node.js's fs.readFile
, but in the browser the
options
is ignored.
atomic.writeFile(file, data[, options], callback)
Same arguments as Node.js's fs.writeFile
, but in the browser the
options
is ignored.
FAQs
<!-- SPDX-FileCopyrightText: 2021 Anders Rune Jensen
The npm package atomic-file-rw receives a total of 45 weekly downloads. As such, atomic-file-rw popularity was classified as not popular.
We found that atomic-file-rw demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.